package com.srd.phone.dialog;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.shengrongdai.srd.R;

/**
 * 资金托管认证dialog
 */
public class MoneyTrustDialog extends AlertDialog {

    private Context mContext;
    private View.OnClickListener mClose;
    private View.OnClickListener mOpen;

    protected MoneyTrustDialog(Context context) {
        super(context);
        mContext = context;
    }

    public MoneyTrustDialog(Context context, View.OnClickListener close, View.OnClickListener open) {
        this(context);
        mClose = close;
        mOpen = open;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_register_success);
        getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        ImageView iv_close = (ImageView) findViewById(R.id.iv_close);
        iv_close.setOnClickListener(mClose);
        TextView tv_open = (TextView) findViewById(R.id.tv_open);
        tv_open.setOnClickListener(mOpen);
        setCanceledOnTouchOutside(false);
    }
}
